
import fetch from '../../utils/http/fetch.js'
import consts from '../../utils/http/consts.js'

const ROOT = './cs/u';

export default {  
  list(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/list`);
  },
  new(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/new`);
  },
  update(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/update`);
  }, 
  delete(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/delete`);
  }, 
  sort(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/ud`);
  },
  exist(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/exist`);
  },
}
